Skip to content

Instantly share code, notes, and snippets.

@mcollina
mcollina / guide.md
Created April 30, 2026 09:41
Configuring minimum release age across npm, pnpm, and yarn

Configuring minimum release age across npm, pnpm, and yarn

Setting a minimum release age (a "cooldown") on dependencies is a cheap, high-leverage defense against supply-chain attacks. Most malicious package versions are detected and yanked within hours, so a 24-hour delay filters out the smash-and-grab incidents (axios 1.14.1, ua-parser-js, Solana web3.js, etc.).

All three major Node.js package managers now support this, but each one used a different name and a different unit. Here is what you need.

Minimum versions

Tool Setting Unit Introduced in
@eylenburg
eylenburg / msoffice_in_linux.md
Last active July 27, 2026 21:19
Installing Microsoft Office in Linux

Step by step guide: How to install Microsoft Office in any Linux distribution

There are multiple options how to install MS Office on Linux.

VM-based - Integrate Windows apps running in a Windows virtual machine as native-looking in Linux

  1. LinOffice - Microsoft Office Launcher for Linux, my own fork of Winapps which is focused on only running Microsoft Office, with some Office-specific improvements over Winapps and a fully automated setup. Eventually I would like to create a GUI for it. Decribed below
  2. Winapps, based on KVM, QEMU, Docker/Podman and FreeRDP. Still actively maintained (getting Github commits). Decribed below
  3. Cassowary, based on KVM, QEMU, libvirt/virt-manager, and FreeRDP. Last release in Feb 2022 and seems to be abandoned.
@Cheatoid
Cheatoid / extensions.d.ts
Last active July 27, 2026 21:09
TSTL plugins (unsafe_cast, goto/label, continue, next, vararg, methodsof, prototypeof, inline, typedparams) ✨
/**
* Emits a Lua continue statement.
* @internal
* @emits `continue`
*/
declare function __continue(this: void): void;
/**
* Emits a Lua goto statement (requires Lua 5.2+ or JIT).
* @param label - The label name to jump to.
@x1any
x1any / zotero-loacl-api.md
Last active July 27, 2026 21:00
Zotero Local API Usage Guide

Zotero Local API Usage Guide

This document summarizes the usage of the Zotero Local API (http://127.0.0.1:23119/api/), based on the Zotero Web API v3 official documentation and verified through actual curl testing.

Enable Local API

In the Zotero desktop client:

  1. Go to Edit → Preferences (on macOS: Zotero → Preferences).
  2. Navigate to the Advanced tab.
@thinkphp
thinkphp / gist:1448754
Created December 8, 2011 21:44
Binary Search Tree Implementation in PHP
<?php
/**
* by Adrian Statescu <adrian@thinkphp.ro>
* Twitter: @thinkphp
* G+ : http://gplus.to/thinkphp
* MIT Style License
*/

Tuning Windows 10 for Slow Machines

Windows 10 on slow netbook

This guide is for those who dares to install Windows 10 on slow netbooks (1GB of RAM).
Though Windows update program is over, you still may use old Windows product keys from license stickers to install Windows 10 on old machines.

UPD Jan 2019
This article is quite old, some instructions may be obsolete.

@ix4
ix4 / index.html
Created January 20, 2020 03:22
pdf417-generator
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>PDF417 HUB3 2D barcode generator</title>
<style>
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@Jiab77
Jiab77 / setup-nut-and-netdata-on-ubuntu.md
Last active July 27, 2026 20:39
In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

Setup nut and netdata on Ubuntu

In this document, I will explain how to setup nut (Network UPS Tools) on Ubuntu 18.04 and 20.04.

It is basically the next chapter of my previous gist, Upgrade nut on Ubuntu 18.04.

I'll only document USB connected UPS and not the other supported connection modes.

Install required dependencies